$(function(){
	//参与人模态框弹出
	$("#Part").click(function(){
		$('#myPart').modal('show');
	});
	var infoId=queryString('detailId');
	requModiJud(infoId);
	
});
//正则取链接传来的数据
function queryString(key)
{
    var regex_str = "^.+\\?.*?\\b"+ key +"=(.*?)(?:(?=&)|$|#)";
    var regex = new RegExp(regex_str,"i");
    var url = window.location.toString();
    if(regex.test(url)) return RegExp.$1;
    return undefined;
}
//根据id获取当前研判的信息
function requModiJud(infoId){
	
	var object={"id":8557,"split":"政工","classifi":"一级","sort":"显性任务派遣类","source":"上级检查","title":"这是简介","content":"这是内容","measure":"这是措施","standard":"这是标准"};
	$(".profile").val(object.title);
	$(".content").val(object.content);
	$(".standard").val(object.standard);
	$(".measure").val(object.measure);
}
//研判模态框
function dispatModal(){
	$("#dispatModal").modal('show');
}
//保存研判的信息
function savadispatBtn(){
	$("#dispatModal").modal('hide');
	var judgeMes={};
	judgeMes.split=$('.reSearchSplit option:selected').val();
	judgeMes.sort=$('.requestSort option:selected').val();
	judgeMes.classifi=$('.reSearchpes option:selected').val();
	judgeMes.source=$(".source").html();
	judgeMes.profile=$(".profile").val();
	judgeMes.content=$(".content").val();
	judgeMes.standard=$(".standard").val();
	judgeMes.measure=$(".measure").val();
	
	//起始时间
	var start=$("#valStart").val();
	var end=$("#valEnd").val();
	var array=[];
	array=YuXi.timestamp.get(start,end,null);
	judgeMes.starttimestamp=array[0];
	judgeMes.endtimestamp=array[1];
	
	alert(JSON.stringify(judgeMes));
}